//判断一个数是否为回文数
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        if(num < 0) return ;
        int cur = 0, tmp = num;
        while(tmp != 0){
            cur = cur*10 + tmp%10;
            tmp = tmp/10;
        }
        System.out.println(cur==num);
    }